package com.itheima.itcasthealth.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface SetmealAndCheckGroupMapper {
    @Insert("insert into t_setmeal_checkgroup values (#{setmealId},#{checkgroupId})")
    void andCheckGroupBySetmealId(@Param("setmealId") Integer id, @Param("checkgroupId") Integer checkgroupId);

    @Delete("delete from t_setmeal_checkgroup where setmeal_id = #{id}")
    void deleteBySetmealId(Integer id);

    @Select("select checkgroup_id from t_setmeal_checkgroup where setmeal_id = #{id}")
    Integer[] findCheckGroupIdsBySetmealId(Integer id);

}
